package com.ruibang.glass.purchase.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.purchase.dto.FileInfoDTO;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 采购订单详情表
 * </p>
 *
 * @author mameng
 * @since 2024-03-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(description = "采购订单详情表")
@TableName("g_purchase_order_details")
public class PurchaseOrderDetails extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "序号")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "采购单号")
    private String purchaseOrderNumber;

    @ApiModelProperty(value = "合同编号")
    private String contractNumber;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "供应商Id")
    private String supplierId;

    @ApiModelProperty(value = "项目编号")
    private String projectNumber;

    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "订单状态 1_未到货  2_部分到货 3_全部到货")
    private String orderStatus;

    @ApiModelProperty(value = "状态描述")
    private String statusDescription;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "申请人")
    private String applicant;

    @ApiModelProperty(value = "申请人")
    private String applicantId;

    @ApiModelProperty(value = "申请部门")
    private String deptId;

    @ApiModelProperty(value = "申请部门名称")
    private String deptName;

    @ApiModelProperty(value = "结束 1_结束 0_未结束")
    private String overStatus;

    @ApiModelProperty(value = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applicationTime;

    @ApiModelProperty(value = "验收人")
    private String acceptor;

    @ApiModelProperty(value = "验收人名称")
    @TableField(exist = false)
    private String acceptorName;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "合同id")
    private String contractId;

    @ApiModelProperty(value = "支付状态 1-- 支付  2——未支付")
    private String payStatus;

    @TableField(exist = false)
    private List<String> fileIdList;

    @TableField(exist = false)
    private List<FileInfoDTO> fileList;

    @TableField(exist = false)
    private List<String> removeFileIdList;

    @TableField(exist = false)
    private List<String> removeProductIdList;

    @TableField(exist = false)
    private List<PurchaseRelatedProduct> purchaseRelatedProductList;

    @TableField(exist = false)
    private String menuId;

    @TableField(exist = false)
    @ApiModelProperty(value = "采购到货单")
    private String arrivalNumber;

    @TableField(exist = false)
    @ApiModelProperty(value = "到货确认人")
    private String arrivalConfirmUser;

    @TableField(exist = false)
    @ApiModelProperty(value = "到货确认人id")
    private String arrivalConfirmUserId;

    @ApiModelProperty(value = "验收人")
    @TableField(exist = false)
    private String inspector;

    @ApiModelProperty(value = "收货人电话")
    @TableField(exist = false)
    private String receiverPhone;


}
